import { createAPI } from '@/utils/request'

// 标签列表接口
export const getAllTags = data => createAPI('/tags', 'get', data)

// 新增标签接口
export const addTag = data => createAPI('/tags', 'post', data)

// 学科简单列表接口
export const getSimpleSubjects = () => createAPI('/subjects/simple', 'get')

// 删除标签接口
export const delTagById = id => createAPI(`/tags/${id}`, 'delete')

// 修改标签接口
export const editTagById = data => createAPI(`/tags/${data.id}`, 'put', data)

// 获取标签详情接口
export const getTagDetail = id => createAPI(`/tags/${id}`, 'get')

// 更改标签状态接口
export const changeState = (id, state) => createAPI(`/tags/${id}/${state}`, 'post')

export const getTagDetials = data => createAPI(`/tags/${data.value}`, 'get', data)
